package File流;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author chihb
 * @create-time 2024/7/5 9:21
 * @description
 */
public class Test {
    public static void main(String[] args) throws IOException {
        FileInputStream inputStream=new FileInputStream("itheima/a.txt");
//        int b;
//        while ((b=inputStream.read())!=-1){
//            System.out.println((char)b);
//        }
        byte[] buffer=new byte[3];
        int len;
        while ((len=inputStream.read(buffer))!=-1){
            String rs=new String(buffer,0,len);
            System.out.println(rs);
        }
        inputStream.close();
    }
}
